home *** CD-ROM | disk | FTP | other *** search
/ PCGUIA 2010 Software/Programs / PCGuia_programas.iso / Software / Internet / FeedDemon / FeedDemonInstall.exe / {app} / Data / poptopics.xsl < prev    next >
Encoding:
Extensible Markup Language  |  2009-09-09  |  9.9 KB  |  275 lines

  1. <?xml version="1.0"?>
  2.  
  3. <xsl:stylesheet version="1.0"
  4.     xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  5.     xmlns:fd="http://www.bradsoft.com/feeddemon/xmlns/1.0/">
  6.  
  7. <xsl:output method="html"
  8.     doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
  9.     doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/>
  10.  
  11. <xsl:template match="links">
  12. <html>
  13. <head>
  14.     <title>$LANG_CONST(S_MemeRptTitle)$</title>
  15.     $INCLUDE(metatrans.inc)$
  16.     <style type="text/css">
  17.         $INCLUDE(surfer.css)$
  18.         $INCLUDE(commonstyles.css)$
  19.         
  20.         .groupheader {
  21.             margin-bottom: 16px;            
  22.             padding-left: 24px;
  23.         }
  24.  
  25.         #pagehead {    width: 100%; }
  26.         #container { 
  27.             margin: 22px 24px; 
  28.             margin-right: 16px;
  29.             margin: 0;
  30.         }
  31.  
  32.         #mylinks, #ngpostlist {
  33.             font-size: 94%;
  34.         }
  35.         #mylinks {
  36.             margin-left: 24px;
  37.             width: 55%;
  38.         }
  39.         div#sidebar {
  40.             float: right;
  41.             width: 40%;
  42.             /*max-height: 500px; 
  43.             overflow-x: hidden;
  44.             overflow-y: auto;*/
  45.             background-color: $COLOR-SIDEBAR$;
  46.             border-left: 1px dotted $COLOR-SIDEBAR-BORDER$;
  47.             border-bottom: 1px dotted $COLOR-SIDEBAR-BORDER$;
  48.             padding: 0;
  49.         }
  50.         #ngpostlist {
  51.             padding-bottom: 18px;
  52.             padding-left: 26px;
  53.             padding-right: 20px;            
  54.         }
  55.         
  56.         .nolinks { color: $COLOR-PAGEHEAD2$; margin: 20px; max-width: 500px; }
  57.         .nolinks a { text-decoration: underline; }
  58.         
  59.         /* container for link and its posts */
  60.         div.linkpost {
  61.             padding-bottom: 22px; 
  62.             padding-right: 20px;
  63.             margin-bottom: 22px;            
  64.             min-height: 120px; /* prevent img.fdpostimg overlapping next post */
  65.         }
  66.         
  67.         img.fdpostimg {            
  68.             width: 80px;
  69.             max-height: 120px; /* same as div.linkpost min-height */
  70.             margin-left: 10px;
  71.             margin-bottom: 6px;
  72.         }
  73.         a:hover img.fdpostimg { background-color: $COLOR-FOCUS-HIGHLIGHT$; }        
  74.  
  75.         .linktitle a { text-decoration: underline; color: $COLOR-HYPERLINK$; }
  76.         .linktitle { font-weight: bold; }
  77.         .linktitle, .linkicons {
  78.             display: inline;
  79.         }
  80.         
  81.         div.excerpt { 
  82.             margin-top: 14px; 
  83.             margin-bottom: 14px;
  84.             margin-right: 18px;
  85.         }
  86.         div.excerpt img.toggle {
  87.             margin: 0;
  88.             padding: 0;
  89.             padding-right: 1px;
  90.             margin-right: 1px;            
  91.         }
  92.         div.excerpt > span.expanded {
  93.             display: inline-block;
  94.             border-left: 2px solid $COLOR-FOCUS-HIGHLIGHT$;
  95.             padding-left: 12px;
  96.         }
  97.  
  98.         img.icon { margin-left: 2px; }
  99.         img.hidetopic { margin-right: 6px; }
  100.         
  101.         span.dateline { margin-right: 6px; }
  102.         span.postdate { color: gray; }
  103.         span.sep { color: silver; margin: 0 4px; }
  104.  
  105.         a#filter { font-weight: normal; }
  106.         a#filter:hover { color: $COLOR-PAGEHEAD2$ !important; }
  107.         a#filter, a.post, a.feedtitle:hover { text-decoration: underline; }
  108.  
  109.         a.feedtitle { font-weight: normal; text-decoration: none; }
  110.         
  111.         /* posts w/o excerpt - keep on one line */
  112.         div.post { white-space: nowrap; }
  113.         div.post .feedtitle { max-width: 35%; }
  114.         div.post .posttitle { max-width: 55%; }
  115.         div.post .posttitle, div.post .feedtitle  {
  116.             display: inline-block;
  117.             overflow: hidden;
  118.             text-overflow: ellipsis;
  119.             vertical-align: top;
  120.         }
  121.  
  122.         .linktitle { }
  123.         
  124.         div#sidebar div.none { color: gray; margin-left: 2px; margin-bottom: 8px; }
  125.         div.ngpost { }    
  126.         span.ngtitle {
  127.             max-width: 80%;
  128.             display: inline-block;
  129.             white-space: nowrap;
  130.             overflow-x: hidden;
  131.             text-overflow: ellipsis;            
  132.         }    
  133.         .ngtitle a { font-weight: bold; text-decoration: underline; color: $COLOR-HYPERLINK$; }
  134.         .ngtitle a:hover { color: $COLOR-HYPERLINK-HOVER$; }
  135.         .ngtitle a:visited { color: #778899; }
  136.         div.ngexcerpt { margin-bottom: 18px; }
  137.         div.ngexcerpt, div.excerpt { }
  138.         div#ngprogress {
  139.             text-transform: uppercase;
  140.             font-size: x-small;
  141.             margin-top: 20px;
  142.             margin-left: 5px;
  143.         }
  144.         div#ngprogress img { margin-right: 6px; }
  145.         div#page-actions {
  146.             float: right;
  147.             margin-right: 24px;
  148.             vertical-align: middle;
  149.             font-size: smaller;
  150.         }        
  151.     </style>
  152. </head>
  153. <body>
  154.     <div id="pagehead">        
  155.         <div id="newspapertitle">
  156.             <!-- uncomment next line to enable exporting popular topics to HTML -->
  157.             <!-- <div id="page-actions"><a href="fdaction:?action=exportpoptopics">$LANG_CONST(S_Export)$...</a></div> -->
  158.  
  159.             <img src="$IMAGEDIR$popular-lg.png" align="absmiddle" />
  160.             $LANG_CONST(S_MemeRptTitle)$: 
  161.             <a id="filter" href="fdaction:?action=choosememefilter"><xsl:value-of select="@filter"/> <!-- <img src="$IMAGEDIR$arrow-dropdown.gif" align="bottom" /> --></a>
  162.         </div>
  163.     </div>
  164.     <div id="container">
  165.         <xsl:variable name="num-links"><xsl:value-of select="count(link)"/></xsl:variable>
  166.         
  167.         <!-- popular topics on NGOnline - inserted dynamically -->
  168.         <xsl:if test="@showEveryone">
  169.             <div id="sidebar">
  170.                 <div class="groupheader">$LANG_CONST(S_PopularTopics_Everyone)$</div>
  171.                 <div id="ngpostlist">
  172.                     <div id="ngprogress"><img src="$IMAGEDIR$ani-progress.gif" align="absmiddle" /> $LANG_CONST(S_StatusLoading)$</div>
  173.                 </div>
  174.             </div>
  175.             <div class="groupheader">$LANG_CONST(S_PopularTopics_Me)$</div>
  176.         </xsl:if>        
  177.  
  178.         <xsl:if test="$num-links=0">
  179.             <div class="nolinks">
  180.                 $LANG_CONST(S_NewsLblNoMemes)$
  181.                 <!-- <br /><br />
  182.                 <a href="fdaction:?action=findfeeds">$LANG_CONST(S_NewsLblFindFeeds)$</a> -->
  183.             </div>
  184.         </xsl:if>
  185.  
  186.         <div id="mylinks">
  187.             <xsl:for-each select="link">
  188.                 <!-- sort links by popularity -->
  189.                 <xsl:sort select="@numPosts" order="descending" data-type="number"/>
  190.                  <xsl:variable name="link-url" select="@url"/> 
  191.                  <xsl:variable name="link-hash" select="@urlHash"/>
  192.                 <xsl:variable name="link-image-url" select="@imageUrl"/>
  193.                 <xsl:variable name="link-image-title" select="@imageTitle"/>
  194.                 <!-- <xsl:variable name="link-image-href" select="@imageHref"/> -->
  195.                 <xsl:variable name="link-image-href">
  196.                     fdaction:?action=gotopost&feedid=<xsl:value-of select="@imageFeedId"/>&postid=<xsl:value-of select="@imagePostId"/>&markpostread=0
  197.                 </xsl:variable>
  198.                 
  199.                 <div class="linkpost" id="{$link-hash}">
  200.                     <xsl:for-each select="post">
  201.                         <xsl:sort select="@sortIndex" data-type="number"/>
  202.                         <xsl:sort select="@feedTitle" data-type="text"/>
  203.                         
  204.                         <xsl:variable name="post-title-id"><xsl:value-of select="@postId"/>_title</xsl:variable>
  205.                         <xsl:variable name="post-num"><xsl:value-of select="position()"/></xsl:variable>
  206.                         <xsl:variable name="post-link">fdaction:?action=gotopost&feedid=<xsl:value-of select="@feedId"/>&postid=<xsl:value-of select="@postId"/><xsl:if test="@read='false'">&markpostread=1</xsl:if></xsl:variable>
  207.                         <xsl:variable name="post-link-newtab">fdaction:?action=gotopostlink&newtab=1&feedid=<xsl:value-of select="@feedId"/>&postid=<xsl:value-of select="@postId"/><xsl:if test="@read='false'">&markpostread=1</xsl:if></xsl:variable>
  208.                         <xsl:variable name="feed-link">fdaction:?action=gotofeed&feedid=<xsl:value-of select="@feedId"/></xsl:variable>
  209.                         <xsl:variable name="post-excerpt"><xsl:value-of select="." disable-output-escaping="no"/></xsl:variable>
  210.  
  211.                         <xsl:variable name="post-class">
  212.                             <xsl:choose>
  213.                                 <xsl:when test="@read='false'">unread post</xsl:when>
  214.                                 <xsl:otherwise>normal post</xsl:otherwise>
  215.                             </xsl:choose>
  216.                         </xsl:variable>
  217.                         <xsl:choose>
  218.                             <!-- show title and excerpt from first (earliest) post -->
  219.                             <xsl:when test="$post-num=1">                            
  220.                                 <div class="linktitle">
  221.                                     <a id="{$post-title-id}" class="{$post-class}" href="{$post-link}" title="$LANG_CONST(S_NewsHintGotoPost)$">
  222.                                         <xsl:value-of select="@title"/>
  223.                                     </a>
  224.                                 </div>
  225.                                 
  226.                                 <div class="linkicons">
  227.                                     <!-- open link in new tab -->
  228.                                     <a class="icon" href="{$post-link-newtab}" title="$LANG_CONST(S_NewsHintOpenInNewTab)$">
  229.                                         <img src="$IMAGEDIR$linknew.gif" class="icon" align="absmiddle" />
  230.                                     </a>                            
  231.                                 </div>
  232.                                 <div class="excerpt">
  233.                                     <!-- image for this link -->
  234.                                     <xsl:if test="$link-image-url">
  235.                                         <a id="{@postId}_fdpostimg" href="{$link-image-href}" title="{$link-image-title}"><img class="fdpostimg" src="{$link-image-url}" /></a>
  236.                                     </xsl:if>
  237.                                     <!-- toggle excerpt -->
  238.                                     <a class="icon" title="$LANG_CONST(S_NewsHintExpand)$" href="fdaction:?action=toggleexcerpt&postid={@postId}&feedid={@feedId}">
  239.                                         <img src="$IMAGEDIR$arrowright2.gif" id="{@postId}_img_toggle_excerpt" align="absmiddle" class="toggle icon" />
  240.                                     </a>
  241.                                     <span class="dateline">
  242.                                         <a class="feedtitle" href="{$feed-link}" title="$LANG_CONST(S_NewsHintGotoFeed)$"><xsl:value-of select="@feedTitle"/></a>
  243.                                          <span class="postdate"><xsl:value-of select="@dateDisplay"/></span>:
  244.                                     </span>
  245.                                     <span id="{@postId}_description" class="collapsed">
  246.                                         <xsl:value-of select="$post-excerpt"/>
  247.                                     </span>
  248.                                     <a class="more" title="$LANG_CONST(S_NewsHintExpand)$" href="fdaction:?action=toggleexcerpt&postid={@postId}&feedid={@feedId}" id="{@postId}_expand_link">$LANG_CONST(S_NewsLblExpand)$</a>
  249.                                 </div>
  250.                             </xsl:when>
  251.                             <!-- show only title of subsequent posts (excerpt in tooltip) -->
  252.                             <xsl:otherwise>
  253.                                 <div class="post">
  254.                                     <a class="feedtitle" href="{$feed-link}" title="$LANG_CONST(S_NewsHintGotoFeed)$"> <xsl:value-of select="@feedTitle"/></a>
  255.                                     <span class="sep">/</span>
  256.                                     <a id="{$post-title-id}" class="posttitle {$post-class}" href="{$post-link}" title="{$post-excerpt}">
  257.                                         <xsl:value-of select="@title" disable-output-escaping="yes"/>
  258.                                     </a>
  259.                                     <a class="icon" href="{$post-link-newtab}" title="$LANG_CONST(S_NewsHintOpenInNewTab)$">
  260.                                         <img src="$IMAGEDIR$linknew.gif" class="icon" align="absmiddle" />
  261.                                     </a>
  262.                                 </div>
  263.                             </xsl:otherwise>
  264.                         </xsl:choose>
  265.                         
  266.                     </xsl:for-each> <!-- for each post -->
  267.                 </div>
  268.             </xsl:for-each>  <!-- for each meme -->
  269.         </div> <!-- mylinks -->
  270.     </div> <!-- container -->    
  271. </body>
  272. </html>
  273. </xsl:template>
  274.  
  275. </xsl:stylesheet>